Repository navigation
Conversation
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 34 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
💡 What
Replace repeated
discovery.apps.iter().find(...)scans indiscover_apps(
pkgs/id/crates/id-cli/src/app_manifest.rs) with twoHashMap<String, usize>owner maps (
route_owners,socket_owners) keyed by the registered route/socketvalue and storing the owning app's index. Each app's four collision checks
(duplicate route, route vs registered socket, duplicate socket, socket vs
registered route) are now expected O(1) instead of Θ(N²) over N valid web apps.
🎯 Why
commands::servecallsdiscover_appsduring startup; with many local apps theold repeated full scans made discovery quadratic (issue #8975).
📊 Impact
Discovery goes from Θ(N²) route/socket comparisons to O(N) total for N valid
web apps, while preserving identical first-conflict diagnostics and first-wins
ordering.
🔬 Measurement
cargo test -p id-cli app_manifest(29 tests, incl. the cross-kind first-winsproptest) passes unchanged. No timing-based checks added; correctness oracle is
the existing test suite.
Fixes #8975. Tracks #9868.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.